package com.yhj.service.handler;

import com.yhj.handler.Handler;
import com.yhj.vo.Request;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author yaohj
 * @date 2025年02月05日 10:53
 */
@Service
public class ProcessingService {
    @Autowired
    private Handler handlerChain;

    public void processRequest(String data) {
        Request request = new Request();
        request.setData(data);
        handlerChain.handle(request);
        System.out.println("最终处理状态: " + request.isHandler());
    }
}
